import { mapState } from 'vuex'

var vm = {
    data() {
        return {
            QRImg: null
        }
    },
    computed: {
        ...mapState(['user'])
    },
    mounted() {
        $ajax.user.invite({
            userId: this.user.userId
        }).then(res => {
            var { code, data } = res.data
            if (code == 'S') {
                this.QRImg = data.base64
            }
        })
    },
    mixins: [$mixins.needLogin]
}

export default vm